package scsc.pub.data;

import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="Leave"
 *         schema="scsc"
 *         dynamic-update="true"
 *         dynamic-insert="true"
 *     
*/
public class Leave implements Serializable {

    /** identifier field */
    private Integer id;

    /** nullable persistent field */
    private String applier;

    /** nullable persistent field */
    private String dept;

    /** nullable persistent field */
    private String reason;

    /** nullable persistent field */
    private String destination;

    /** nullable persistent field */
    private String startDate;

    /** nullable persistent field */
    private String endDate;

    /** nullable persistent field */
    private String applyDate;

    /** nullable persistent field */
    private String approved;

    /** persistent field */
    private long processInstanceId;

    /** nullable persistent field */
    private String state;

    /** full constructor */
    public Leave(String applier, String dept, String reason, String destination, String startDate, String endDate, String applyDate, String approved, long processInstanceId, String state) {
        this.applier = applier;
        this.dept = dept;
        this.reason = reason;
        this.destination = destination;
        this.startDate = startDate;
        this.endDate = endDate;
        this.applyDate = applyDate;
        this.approved = approved;
        this.processInstanceId = processInstanceId;
        this.state = state;
    }

    /** default constructor */
    public Leave() {
    }

    /** minimal constructor */
    public Leave(long processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    /** 
     *            @hibernate.id
     *             generator-class="identity"
     *             type="java.lang.Integer"
     *             column="Id"
     *             unsaved-value="0"
     *         
     */
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    /** 
     *            @hibernate.property
     *             column="Applier"
     *             length="7"
     *         
     */
    public String getApplier() {
        return this.applier;
    }

    public void setApplier(String applier) {
        this.applier = applier;
    }

    /** 
     *            @hibernate.property
     *             column="Dept"
     *             length="9"
     *         
     */
    public String getDept() {
        return this.dept;
    }

    public void setDept(String dept) {
        this.dept = dept;
    }

    /** 
     *            @hibernate.property
     *             column="Reason"
     *             length="200"
     *         
     */
    public String getReason() {
        return this.reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    /** 
     *            @hibernate.property
     *             column="Destination"
     *             length="5"
     *         
     */
    public String getDestination() {
        return this.destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    /** 
     *            @hibernate.property
     *             column="StartDate"
     *             length="23"
     *         
     */
    public String getStartDate() {
        return this.startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    /** 
     *            @hibernate.property
     *             column="EndDate"
     *             length="23"
     *         
     */
    public String getEndDate() {
        return this.endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    /** 
     *            @hibernate.property
     *             column="ApplyDate"
     *             length="23"
     *         
     */
    public String getApplyDate() {
        return this.applyDate;
    }

    public void setApplyDate(String applyDate) {
        this.applyDate = applyDate;
    }

    /** 
     *            @hibernate.property
     *             column="Approved"
     *             length="1"
     *         
     */
    public String getApproved() {
        return this.approved;
    }

    public void setApproved(String approved) {
        this.approved = approved;
    }

    /** 
     *            @hibernate.property
     *             column="ProcessInstanceId"
     *             length="18"
     *             not-null="true"
     *         
     */
    public long getProcessInstanceId() {
        return this.processInstanceId;
    }

    public void setProcessInstanceId(long processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    /** 
     *            @hibernate.property
     *             column="State"
     *             length="1"
     *         
     */
    public String getState() {
        return this.state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("id", getId())
            .toString();
    }

}
